package com.gateon.hw.system.provider;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import com.gateon.hw.system.entity.SupplierContract;
import com.gateon.hw.system.service.ISupplierContractService;
import com.gateon.hw.system.mapper.SupplierContractMapper;
import java.util.List;
import com.gateon.hw.client.system.resp.SupplierContractResp;
import com.gateon.hw.client.system.req.SupplierContractListReq;
import com.gateon.hw.client.system.req.SupplierContractAddReq;
import com.gateon.hw.client.system.req.SupplierContractUpdateReq;
import com.gateon.hw.base.vo.Result;
import org.springframework.beans.BeanUtils;

/**
*  合同信息表实体bean
* Created by leslie on 2020-4-29 15:38:04
*/
@RestController
public class SupplierContractProvider implements SupplierContractClient{
    @Autowired
    private ISupplierContractService SupplierContractService;

    @Override
    public Result<IPage<SupplierContractResp>> list(@RequestBody SupplierContractListReq req) {
        return SupplierContractService.list(req);
    }

    @Override
    public Result<SupplierContractResp> detail(@PathVariable("id") Long id) {
        return SupplierContractService.detail(id);
    }

    @Override
    public Result insert(@RequestBody SupplierContractAddReq req) {
        return SupplierContractService.insert(req);
    }

    @Override
    public Result update(@RequestBody SupplierContractUpdateReq req) {
        return SupplierContractService.update(req);
    }

    @Override
    public Result delete(@PathVariable("id") Long  id) {
        return SupplierContractService.delete(id);
    }

}
